import 'package:json_annotation/json_annotation.dart';

part 'videoModel.g.dart';


@JsonSerializable()
class VideoModel extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'message')
  String message;

  @JsonKey(name: 'result')
  Result result;

  VideoModel(this.code,this.message,this.result,);

  factory VideoModel.fromJson(Map<String, dynamic> srcJson) => _$VideoModelFromJson(srcJson);

}


@JsonSerializable()
class Result extends Object{

  @JsonKey(name: 'adExist')
  bool adExist;

  @JsonKey(name: 'count')
  int count;

  @JsonKey(name: 'itemList')
  List<ItemList> itemList;

  @JsonKey(name: 'total')
  int total;

  Result(this.adExist,this.count,this.itemList,this.total,);

  factory Result.fromJson(Map<String, dynamic> srcJson) => _$ResultFromJson(srcJson);

}


@JsonSerializable()
class ItemList extends Object {

  @JsonKey(name: 'adIndex')
  int adIndex;

  @JsonKey(name: 'data')
  Data data;

  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'type')
  String type;

  ItemList(this.adIndex,this.data,this.id,this.type,);

  factory ItemList.fromJson(Map<String, dynamic> srcJson) => _$ItemListFromJson(srcJson);

}


@JsonSerializable()
class Data extends Object{

  @JsonKey(name: 'actionUrl')
  String actionUrl;

  @JsonKey(name: 'dataType')
  String dataType;

  @JsonKey(name: 'description')
  String description;

  @JsonKey(name: 'expert')
  bool expert;

  @JsonKey(name: 'follow')
  Follow follow;

  @JsonKey(name: 'icon')
  String icon;

  @JsonKey(name: 'iconType')
  String iconType;

  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'ifPgc')
  bool ifPgc;

  @JsonKey(name: 'ifShowNotificationIcon')
  bool ifShowNotificationIcon;

  @JsonKey(name: 'title')
  String title;

  @JsonKey(name: 'uid')
  int uid;

  Data(this.actionUrl,this.dataType,this.description,this.expert,this.follow,this.icon,this.iconType,this.id,this.ifPgc,this.ifShowNotificationIcon,this.title,this.uid,);

  factory Data.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson);

}


@JsonSerializable()
class Follow extends Object{

  @JsonKey(name: 'followed')
  bool followed;

  @JsonKey(name: 'itemId')
  int itemId;

  @JsonKey(name: 'itemType')
  String itemType;

  Follow(this.followed,this.itemId,this.itemType,);

  factory Follow.fromJson(Map<String, dynamic> srcJson) => _$FollowFromJson(srcJson);

}


